#region Copyright
/// <copyright>
/// Copyright (c) 2007 Ilia Shramko.
/// Released under the terms of the GNU General Public License.
/// </copyright>
#endregion

using System;
using System.Collections.Generic;
using System.Text;

namespace Osh.Teletext
{
	public class NonDisplayablePacket : TeletextPacket
	{
		private byte _designationCode;
		private byte[] _data;

		protected NonDisplayablePacket(int magazine, int packet, int designationCode)
			: base(magazine, packet)
		{
			_designationCode = (byte)designationCode;
		}
		
		public NonDisplayablePacket(int magazine, int packet, byte[] data, int position) : base(magazine, packet)
		{
			_data = new byte[40];
			Buffer.BlockCopy(data, position, _data, 0, 40);
			_designationCode = (byte)TeletextDecoder.DecodeDesignationCode(data, position);
		}

		public int DesignationCode
		{
			get { return _designationCode; }
		}
	}
}
